package com.hss.rxjava.bean;

import com.hss.rxjava.CheckInterface;
import com.hss.rxjava.StringUtils;

import java.util.LinkedList;

public class OrderProduct implements CheckInterface {
	private String productId;//商品ID
	private String currentPrice;//现价
	private String productCount;//数量
	private String title;//商品名称，标题
	private String productIcon;//商品列表中图片
	private String productStatus;
	private String productInfos;
	
	private String content;//评论
	private float goodsDesPoint;//评分
	public double price;
	public String productName;
	private String hasComment;
	private String mailType;//1.   2.实物    3.电子券
	public int goodsSource;//1：医药，2：普通，3：员福云医疗
	public String goodsCode;//商品代码
	public String agencyCode;//供应商代码
	public String url;//医药的图片地址

	public String getGoodsCode() {
		return goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}

	public String getAgencyCode() {
		return agencyCode;
	}

	public void setAgencyCode(String agencyCode) {
		this.agencyCode = agencyCode;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public int getGoodsSource() {
		return goodsSource;
	}

	public void setGoodsSource(int goodsSource) {
		this.goodsSource = goodsSource;
	}

	public LinkedList<String> goodPhotoList;//评论中添加的商品照片-订单评论用

	public LinkedList<String> getGoodPhotoList() {
		return goodPhotoList;
	}

	public void setGoodPhotoList(LinkedList<String> goodPhotoList) {
		this.goodPhotoList = goodPhotoList;
	}
	
	public String getHasComment() {
		return hasComment;
	}
	public void setHasComment(String hasComment) {
		this.hasComment = hasComment;
	}
	public String getMailType() {
		return mailType;
	}
	public void setMailType(String mailType) {
		this.mailType = mailType;
	}
	public String getProductId() {
		return productId;
	}
	public void setProductId(String productId) {
		this.productId = productId;
	}
	public String getCurrentPrice() {
		return currentPrice;
	}
	public void setCurrentPrice(String currentPrice) {
		this.currentPrice = currentPrice;
	}
	public String getProductCount() {
		return productCount;
	}
	public void setProductCount(String productCount) {
		this.productCount = productCount;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getProductIcon() {
		return productIcon;
	}
	public void setProductIcon(String productIcon) {
		this.productIcon = productIcon;
	}
	public String getProductStatus() {
		return productStatus;
	}
	public void setProductStatus(String productStatus) {
		this.productStatus = productStatus;
	}
	public String getProductInfos() {
		return productInfos;
	}
	public void setProductInfos(String productInfos) {
		this.productInfos = productInfos;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public float getGoodsDesPoint() {
		return goodsDesPoint;
	}
	public void setGoodsDesPoint(float goodsDesPoint) {
		this.goodsDesPoint = goodsDesPoint;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}


	@Override
	public boolean check(int index) {
		switch (index){
			case 1:
				if(!StringUtils.isNotNull(
						title,currentPrice,productIcon
				))return false;
				if(!StringUtils.isValidate(productCount))return false;
				break;
		}
		return true;
	}

	@Override
	public void fix(int index) {
		productIcon = StringUtils.makeStringNotNull(productIcon);
	}
}
